import request from "@/utils/request"

export function getListByPage(params: any) {
  return request({
    params,
    url: "articleManage/article/list",
    method: "get",
  })
}

export function getInfoById(params: any) {
  return request({
    params,
    url: "articleManage/article/getById",
    method: "get",
  })
}

export function getTags() {
  return request({
    url: "articleManage/article/getTags",
    method: "get",
  })
}

export function addArticle(data: any) {
  return request({
    data,
    url: "articleManage/article/add",
    method: "post",
  })
}

export function editArticle(data: any) {
  return request({
    data,
    url: "articleManage/article/edit",
    method: "post",
  })
}

export function articleDelete(params: any) {
  return request({
    params,
    url: "articleManage/article/delete",
    method: "DELETE",
  })
}